-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ascii::Char
-ify the escaping code in core
#111524
Conversation
This means that `EscapeIterInner::as_str` no longer needs unsafe code, because the type system ensures the internal buffer is only ASCII, and thus valid UTF-8.
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
This comment was marked as resolved.
This comment was marked as resolved.
LGTM @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e86fd62): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 640.962s -> 641.899s (0.15%) |
This PR's wins are noise starting from a couple PRs ago in #109773 (comment) returning to steady state. I won't mark this as triaged just yet though: we'll see what happens to |
This means that
EscapeIterInner::as_str
no longer needs unsafe code, because the type system ensures the internal buffer is only ASCII, and thus valid UTF-8.Come to think of it, this also gives it a (non-guaranteed) niche.
cc @BurntSushi as potentially interested
ascii::Char
tracking issue: #110998